package com.zhiyi.app.controller;

import com.zhiyi.app.entity.AppCategory;
import com.zhiyi.app.service.AppCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@Controller
@RequestMapping("/gory")
public class AppCategoryController {
    @Autowired
    private AppCategoryService service;
    @GetMapping("/get")
    @ResponseBody
    public List<AppCategory> getByParentId(Integer id){
        return service.getByParentId(id);
    }
}
